home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atlas of Florida
/
Atlas of Florida.iso
/
Movies
/
1.0 Introduction
/
1.0 Introduction
/
00243_Script_243
< prev
next >
Wrap
Text File
|
1994-08-23
|
12KB
|
305 lines
-- Volume (Vol) return text popUp menu
on AlphabetMenuVol -- a pop up menu returning item text
global PopAlphaVol
-- dispose of any previous instances, if any
if objectP( PopAlphaVol ) then PopAlphaVol( mDispose )
set menuListVol = the text of cast "VolMenList1"
-- Be sure to set parameter itemNum for PopNum or PopText to zero.
set PopAlphaVol = PopMenu(mNew,menuListVol, 216)
if not objectP( PopAlphaVol ) then
alert "PopMenu Object not made: " & string( PopAlphaVol )
end if
-- to set automatic remembering of last item selected
PopAlphaVol(mSmart, 1 )
-- PopMenu uses screen co÷rdinates, which must be changed
-- to window co÷rdinates with the StageLeft & stageTop functions
set sH = the left of sprite 12 + the stageLeft + 1
set sV = the top of sprite 12 + the stageTop + 1
set result = PopAlphaVol(mPopText, sH, sV, 0)
if string( result ) = "" then exit
else set the text of cast "VolMen1" to " " & string( result )
MakeConversionVol
-- dispose of this menu
if objectP( PopAlphaVol ) then PopAlphaVol( mDispose )
on AlphabetMenu2Vol -- a pop up menu returning item text
global PopAlpha2Vol
-- dispose of any previous instances, if any
if objectP( PopAlpha2Vol ) then PopAlpha2Vol( mDispose )
set menuListVol = the text of cast "VolMenList2"
-- Be sure to set parameter itemNum for PopNum or PopText to zero.
set PopAlpha2Vol = PopMenu(mNew,menuListVol, 216)
if not objectP( PopAlpha2Vol ) then
alert "PopMenu Object not made: " & string( PopAlpha2Vol )
end if
-- to set automatic remembering of last item selected
PopAlpha2Vol(mSmart, 1 )
-- PopMenu uses screen co÷rdinates, which must be changed
-- to window co÷rdinates with the StageLeft & stageTop functions
set sH = the left of sprite 15 + the stageLeft + 1
set sV = the top of sprite 15 + the stageTop + 1
set result = PopAlpha2Vol(mPopText, sH, sV, 0)
if string( result ) = "" then exit
else set the text of cast "VolMen2" to " " & string( result )
MakeConversionVol
-- dispose of this menu
if objectP( PopAlpha2Vol ) then PopAlpha2Vol( mDispose )
on MakeConversionVol -- does conversion based on the menus and the entered value
showChannel 14
-- hide other answers
hideChannel 8
hideChannel 20
put string(the text of cast "VolMen1") into menu1Vol
put string(the text of cast "VolMen2") into menu2Vol
put value(the text of cast "VolValue") into cValueVol -- entered by user
put "?" into field "AnswerVol"
if menu1Vol = " oz" then
if menu2Vol = " oz" then
put cValueVol into field "AnswerVol"
put cValueVol into field "AnswerString"
end if
if menu2Vol = " pt" then
put ( cValueVol / 16.0) into field "AnswerVol"
put cValueVol & " / 16" into field "AnswerString"
end if
if menu2Vol = " qt" then
put ( cValueVol / 64.0 ) into field "AnswerVol"
put cValueVol & " / 64" into field "AnswerString"
end if
if menu2Vol = " gal " then
put ( (cValueVol / 64.0 ) / 4.0 ) into field "AnswerVol"
put "( " & cValueVol & " / 64 ) / 4" into field "AnswerString"
end if
if menu2Vol = " cl" then
put (cValueVol * 0.0296 ) * 100.0 into Field "AnswerVol"
put "( " & cValueVol & " * .0296 ) * 100" into field "AnswerString"
end if
if menu2Vol = " l" then
put (cValueVol * 0.0296 ) into field "AnswerVol"
put cValueVol & " * .0296" into field "AnswerString"
end if
if menu2Vol = " kl" then
put ( (cValueVol * 0.0296 ) / 1000.0 ) into field "AnswerVol"
put "( " & cValueVol & " * .0296 ) / 1,000" into field "AnswerString"
end if
end if
if menu1Vol = " pt" then
if menu2Vol = " oz" then
put cValueVol * 16.0 into field "AnswerVol"
put cValueVol & " * 16" into field "AnswerString"
end if
if menu2Vol = " pt" then
put cValueVol into field "AnswerVol"
put cValueVol into field "AnswerString"
end if
if menu2Vol = " qt" then
put ( cValueVol / 2.0 ) into field "AnswerVol"
put cValueVol & " / 2" into field "AnswerString"
end if
if menu2Vol = " gal " then
put ( (cValueVol / 2.0 ) / 4.0 ) into field "AnswerVol"
put "( " & cValueVol & " / 2 ) / 4" into field "AnswerString"
end if
if menu2Vol = " cl" then
put (cValueVol * 0.4732 ) * 100.0 into Field "AnswerVol"
put "( " & cValueVol & " * .4732 ) * 100" into field "AnswerString"
end if
if menu2Vol = " l" then
put (cValueVol * 0.4732 ) into field "AnswerVol"
put cValueVol & " * .4732" into field "AnswerString"
end if
if menu2Vol = " kl" then
put ( (cValueVol * 0.4732 ) / 1000.0 ) into field "AnswerVol"
put "( " & cValueVol & " * .4732 ) / 1,000" into field "AnswerString"
end if
end if
if menu1Vol = " qt" then
if menu2Vol = " oz" then
put cValueVol * 32.0 into field "AnswerVol"
put cValueVol & " * 32" into field "AnswerString"
end if
if menu2Vol = " pt" then
put cValueVol * 2.0 into field "AnswerVol"
put cValueVol & " * 2" into field "AnswerString"
end if
if menu2Vol = " qt" then
put ( cValueVol ) into field "AnswerVol"
put cValueVol into field "AnswerString"
end if
if menu2Vol = " gal " then
put ( cValueVol / 4.0 ) into field "AnswerVol"
put cValueVol & " / 4" into field "AnswerString"
end if
if menu2Vol = " cl" then
put (cValueVol * 0.9464 ) * 100.0 into Field "AnswerVol"
put "( " & cValueVol & " * .9464 ) * 100" into field "AnswerString"
end if
if menu2Vol = " l" then
put (cValueVol * 0.9464 ) into field "AnswerVol"
put cValueVol & " * .9464" into field "AnswerString"
end if
if menu2Vol = " kl" then
put ( (cValueVol * 0.9464 ) / 1000.0 ) into field "AnswerVol"
put "( " & cValueVol & " * .9464 ) / 1,000" into field "AnswerString"
end if
end if
if menu1Vol = " gal " then
if menu2Vol = " oz" then
put cValueVol * 32.0 * 4.0 into field "AnswerVol"
put "( " & cValueVol & " * 32 ) * 4" into field "AnswerString"
end if
if menu2Vol = " pt" then
put cValueVol * 2.0 * 4.0 into field "AnswerVol"
put "( " & cValueVol & " * 2 ) * 4" into field "AnswerString"
end if
if menu2Vol = " qt" then
put ( cValueVol * 4.0 ) into field "AnswerVol"
put cValueVol & " * 4" into field "AnswerString"
end if
if menu2Vol = " gal " then
put cValueVol into field "AnswerVol"
put cValueVol into field "AnswerString"
end if
if menu2Vol = " cl" then
put (cValueVol * 3.7854 ) * 100.0 into Field "AnswerVol"
put "( " & cValueVol & " * 3.7854 ) * 100" into field "AnswerString"
end if
if menu2Vol = " l" then
put (cValueVol * 3.7854 ) into field "AnswerVol"
put cValueVol & " * 3.7854" into field "AnswerString"
end if
if menu2Vol = " kl" then
put ( (cValueVol * 3.7854 ) / 1000.0 ) into field "AnswerVol"
put "( " & cValueVol & " * 3.7854 ) / 1,000" into field "AnswerString"
end if
end if
if menu1Vol = " cl" then
if menu2Vol = " oz" then
put (cValueVol * 0.338) into field "AnswerVol"
put cValueVol & " * .338" into field "AnswerString"
end if
if menu2Vol = " pt" then
put (cValueVol * 0.338) / 16.0 into field "AnswerVol"
put "( " & cValueVol & " * .338 ) / 16" into field "AnswerString"
end if
if menu2Vol = " qt" then
put (cValueVol * 0.338) / 16.0 / 2.0 into field "AnswerVol"
put "( ( " & cValueVol & " * .338 ) / 16 ) / 2" into field "AnswerString"
end if
if menu2Vol = " gal " then
put (cValueVol * 0.338) / 16.